<template>
	<div class="shouji">
		<img src="../assets/img/yidong.png" />
		<div>请移步pc端查看<span>深码数据</span></div>
	</div>
</template>

<script>
	export default{
		name:'shouji',
		mounted() {
			this.zhengju()
			//监控屏幕的变化
			$(window).resize(()=>{ //当浏览器大小变化时
			     this.zhengju()
			});
			
		},
		methods:{
			zhengju(){
				var width=document.documentElement.clientWidth || document.body.clientWidth;
				if(width>750){
					if(!this._isMobile()){
						this.$router.replace('./')
					}
				}
			},
			
			//验证是否是移动端
			_isMobile() {
				let flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)
				return flag;
			}
		}
	}
</script>

<style scoped="scoped" lang="scss">
	*{
		margin: 0;
		padding: 0;
	}
	.shouji{
		text-align: center;
		height: 97vh;
		padding-top: calc(50% - 5rem);
		box-sizing: border-box;
		
		img{
			width: 30rem;
			height: 30rem;
		}
		
		div{
			font-size: 2rem;
			letter-spacing: 0.3rem;
			margin-top:1.5rem ;
			
			span{
				color: #0091FF;
				font-size: 2.1rem;
			}
		}
	}
</style>
